package com.question.dao;

import java.sql.SQLException;
import java.util.List;

import com.question.entity.Answer;
import com.question.entity.Question;
import com.question.entity.User;

public interface IPlayerDao {

	List<Question> questionList(Question question) throws SQLException;

	Question getQuestionById(Integer id) throws SQLException;

	void answerQuestion(Answer answer) throws SQLException;

	void askQuestion(Question question) throws SQLException;


	void editScoreByUser(User user) throws SQLException;

	List<Question> findQuestionByUser(User player) throws SQLException;

	List<Answer> findAnswerByQuestionID(Integer inVal) throws SQLException;

	List<Answer> findAnswerByQuestionIDAndPlayer(User player, Integer qId) throws SQLException;

	User findUserByAnswerId(Integer id) throws SQLException;

	void updateUserAccept(User user) throws SQLException;

	void updateQuestionAccept(Question question) throws SQLException;

	void updateAnswerAccept(Integer id) throws SQLException;

	User updatePlayer(User player) throws SQLException;

	List<User> rankUserByScoreTop10() throws SQLException;

	Question findQuestionInfoById(Integer id) throws SQLException;

}
